package com.donnie.shopping.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.util.Map;

/**
 * @description: 水果价格配置
 * @author: ChenDeXin
 * @time: 2025/5/20 10:44
 */
@Data
@Configuration
@ConfigurationProperties(prefix = "fruit")
public class FruitConfig {

    /**
     * 价格列表：水果名称 -> 价格
     */
    private Map<String, Double> priceList;

    /**
     * 折扣列表：水果名称 -> 折扣率
     */
    private Map<String, Double> discountList;

    /**
     * 满减配置：threshold 为门槛金额，reduction 为减免金额
     */
    private Map<String, Double> reductionList;

    /** 满减基于的特定优惠策略*/
    private String baseCalStrategy;
}
